package com.wellsoft.pt.app.dingtalk.constants;

/**
 * Description: 钉钉APIs
 *  
 * @author Well
 * @date 2020年5月29日
 * @version 1.0
 * 
 * <pre>
 * 修改记录:
 * 修改后版本	修改人		修改日期			修改内容
 * 2020年5月29日.1	Well		2020年5月29日		Create
 * </pre>
 *
 */
public class DingTalkApis {

	private static String BASE_URI = "https://oapi.dingtalk.com";

	/**
	 * access_token获取接口
	 */
	public static final String URI_ACCESS_TOKEN = BASE_URI + "/gettoken";

	/**
	 * 钉钉免密登录获取临时授权码接口
	 */
	public static final String URI_SNS_AUTHORIZE = BASE_URI
			+ "/connect/oauth2/sns_authorize?appid=%s&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=%s";

	/**
	 * 临时授权码获取授权用户信息接口
	 */
	public static final String URI_GETUSERINFO_BYCODE = BASE_URI + "/sns/getuserinfo_bycode";

	/**
	 * 获取用户详情接口
	 */
	public static final String URI_USER_GET = BASE_URI + "/user/get";

	/**
	 * 获取部门列表接口
	 */
	public static final String URI_DEPARTMENT_LIST = BASE_URI + "/department/list";

	/**
	 * 获取部门详情接口
	 */
	public static final String URI_DEPARTMENT_GET = BASE_URI + "/department/get";

	/**
	 * 部门用户列表
	 */
	public static final String URI_USER_SIMPLELIST = BASE_URI + "/user/simplelist?access_token=%s&department_id=%d";

	/**
	 * 部门用户列表详情
	 */
	public static final String URI_USER_LISTBYPAGE = BASE_URI + "/user/listbypage";

	/**
	 * 工作通知消息接口
	 */
	public static final String URI_MESSAGE_CORPCONVERSATION = BASE_URI
			+ "/topapi/message/corpconversation/asyncsend_v2?access_token=%s";

	/**
	 * 发起代办接口
	 */
	public static final String URI_WORKRECORD_ADD = BASE_URI + "/topapi/workrecord/add";

	/**
	 * 更新代办接口
	 */
	public static final String URI_WORKRECORD_UPDATE = BASE_URI + "/topapi/workrecord/update";

	/**
	 * 注册业务事件回调接口
	 */
	public static final String URI_REGISTER_CALL_BACK = BASE_URI + "/call_back/register_call_back";

	/**
	 * 获取回调失败的结果
	 */
	public static final String URI_GET_CALL_BACK_FAILED_RESULT = BASE_URI + "/call_back/get_call_back_failed_result";

}
